//////////////////////////////////////////////////////////////////////////
#include <RocketLua/RocketLua.hpp>


using namespace Rocket::Core::Lua;


//////////////////////////////////////////////////////////////////////////
LuaDocumentInstancer::LuaDocumentInstancer( lua_State* state )
:	Rocket::Core::ElementInstancer()
,	mpState( state )
{
}

Rocket::Core::Element* LuaDocumentInstancer::InstanceElement(
	Rocket::Core::Element*				parent,
	const Rocket::Core::String&			tag,
	const Rocket::Core::XMLAttributes&	attributes )
{
	return new LuaDocument( mpState, tag );
}


void LuaDocumentInstancer::ReleaseElement( Rocket::Core::Element* element )
{
	delete element;
}


void LuaDocumentInstancer::Release()
{
	delete this;
}
